/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: yang
 * Date: 2022-05-16
 * Time: 14:53
 */
public abstract class Person {
    private String name;
    public Person(String name) {
        this.name = name;
    }
    public abstract void func();//不需要具体实现

}

class Student extends Person{
    public Student(String name) {
        super(name);
    }

    public void func(){//必须重写
        System.out.println(this.age);
    }

    //父类构造方法是具体方法，不用重写
}


